<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/view/include/css-include.jsp"%>
<%@ include file="/view/include/jsp-include.jsp"%>
<%@ include file="/view/include/jquery-include.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">

    $().ready(function() {
    	/* 달력 */
    	$( "#date" ).datepicker({
            showOn: "button",
            buttonImage: "/images/calendar.gif",
            buttonImageOnly: true
        });
    	
        $("form[name='gogoForm']").ajaxForm({
        	dataType: "json",
        	beforeSerialize: function($form, options) { 
                // return false to cancel submit  
                if($("input[name='test3']").val()==''){
                    alert('수정할 값 입력하쇼.');
                    return false;
                }
            },
            success:function(data) { 
               if(data.result){
            	   alert("수정완료");
                   var val = ""; 
                   for(var v in data.searchMap) {
                       $("input[name='"+v+"']").val(data.searchMap[v]);
                   } 
               }
               else {
                alert("오류가 발생했습니다.");
               }
               
           },
           error:function(){alert(18);}
        }); 
    });

    function resetForm(){
    	$("form[name='gogoForm']").each(function(){
    		this.reset();
    	});
    }

    function onNoticeList(){
    	location="/notice.html";
    }
    
</script>
</head>
<body>
<div class="wrap">
	<div class="pagetitle">
    	<h1>Notice/Update</h1>
	</div>
    <div class="con_tableW">
    	<table class="TableST">
        	<tr>
            	<th>Seq</th>
                <td>10</td>
                <th>Writer</th>
                <td>Kil-Dong Hong</td>
                <th>Date</th>
                <td>2012.03.09</td>
            </tr>
            <tr>
            	<th>Title</th>
                <td colspan="5"><input type="text" class="inST" size="80" /></td>
            </tr>
            <tr>
            	<td colspan="6">
                	<textarea class="teST" wrap="virtual"></textarea>
                </td>
            </tr>
         </table>
    </div>
    <div class="bo_btn">
    <a href="#"><img src="images/web/btn_confirm.png" alt="confirm" /></a><a href="#"><img src="images/web/btn_cancel.png" alt="cancel" /></a>
    </div>
</div>
</body>
</html>